<% layout('/layouts/default.html', {title: '涉密文件日志审计管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('文件基本信息')}
			</div>
		</div>
		<div class="box-body">

			<#form:form id="searchForm" model="${docLog}" action="${ctx}/sd/docLog/listData?order=a.log_date asc" method="post" class="form-inline hide"
			data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			<#form:input path="docId" maxlength="64" class="form-control width-120"/>
			<div class="form-group">
				<label class="control-label">${text('操作时间')}：</label>
				<div class="control-inline">
					<#form:input path="logDate_gte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
					dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" data-done="logDate_lte.click()"/>
					&nbsp;-&nbsp;
					<#form:input path="logDate_lte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
					dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('来文标题')}：</label>
				<div class="control-inline">
					<#form:input path="docTitle" maxlength="500" class="form-control width-120"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('文件密级')}：</label>
				<div class="control-inline width-120">
					<#form:select path="secLvl" dictType="recv_sec_lvl" blankOption="true" class="form-control"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('来文文号')}：</label>
				<div class="control-inline">
					<#form:input path="docFullNum" maxlength="100" class="form-control width-120"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('操作用户编号')}：</label>
				<div class="control-inline">
					<#form:input path="optUserCode" maxlength="64" class="form-control width-120"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('操作用户姓名')}：</label>
				<div class="control-inline">
					<#form:input path="optUserName" maxlength="50" class="form-control width-120"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('日志类型')}：</label>
				<div class="control-inline width-120">
					<#form:select path="logType" dictType="sd_log_type" blankOption="true" class="form-control"/>
				</div>
			</div>
			<div class="form-group">
				<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
				<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
			</div>
		</#form:form>

		<div class="row" style="margin-bottom: 20px">
			<div class="col-xs-4">
				<div class="form-group">
					<label class="control-label col-sm-4" title="">
						${text('来文标题')}：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<input readonly class="form-control width-260" value="${docRecv.docTitle}" />
					</div>
				</div>
			</div>
			<div class="col-xs-4">
				<div class="form-group">
					<label class="control-label col-sm-4" title="">
						${text('来文文号')}：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<input readonly class="form-control width-260" value="${docRecv.docFullNum}" />
					</div>
				</div>
			</div>
			<div class="col-xs-4">
				<div class="form-group">
					<label class="control-label col-sm-4" title="">
						${text('文件密级')}：<i class="fa icon-question hide"></i></label>
					<div class="col-sm-8">
						<input id="security" readonly="true"  class="form-control width-120" value=""/>
					</div>
				</div>
			</div>
		</div>
		<table id="dataGrid"></table>
		<div id="dataGridPage"></div>
	</div>
</div>
</div>
<% } %>
<script>
	$("#security").val(js.getDictLabel(${@DictUtils.getDictListJson('recv_sec_lvl')}, ${docRecv.secLvl}, '${text("未知")}', true));
	// 初始化DataGrid对象
	$('#dataGrid').dataGrid({
		searchForm: $("#searchForm"),
		columnModel: [
			{header:'${text("日志内容")}', name:'logContent', index:'a.log_content', width:250, align:"left"},
			{header:'${text("操作用户姓名")}', name:'optUserName', index:'a.opt_user_name', width:50, align:"left"},
			//{header:'${text("操作用户编号")}', name:'optUserCode', index:'a.opt_user_code', width:80, align:"left"},
			{header:'${text("操作用户警号")}', name:'optUserPoliceno', index:'a.opt_user_policeno', width:80, align:"left"},
			{header:'${text("日志类型 ")}', name:'logType', index:'a.log_type', width:50, align:"center", formatter: function(val, obj, row, act){
					return js.getDictLabel(${@DictUtils.getDictListJson('sd_log_type')}, val, '${text("未知")}', true);
				}},
			{header:'${text("操作时间")}', name:'logDate', index:'a.log_date', width:120, align:"center"}
		],
		// 加载成功后执行事件
		ajaxSuccess: function(data){

		}
	});
</script>